home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 3⁄16⁄90 / 0079-Re Dead Code Strippi-Mar90 < prev    next >
Encoding:
Text File  |  1990-03-16  |  972 b   |  30 lines  |  [TEXT/GEOL]

  1. Item    3124373                         15-March-90        06:09PST
  2.  
  3. From:   DAWSON.M                        Dawson, Mark
  4.  
  5. To:     CPLUS.DEV$                      C++ Interest List--Developers
  6.  
  7. Sub:    Re: Dead Code Stripping with…
  8.  
  9. >Is it necessary to keep in memory one instance of each "dead strip candidate"
  10. >class?
  11. >Could the sample in "Release Notes, Preliminary C++ Interfaces For MacApp
  12. >2.0ß9" p.3, be written:
  13.  >
  14. >if (gDeadStripSuppression) {
  15. >    TFoo* aFoo = new TFoo; aFoo.Free;
  16. >    TFoo2* aFoo2 = new TFoo2; aFoo2.Free;
  17. >}
  18. >
  19. >Etienne Vautherin
  20.  
  21. If I understand everything right, the whole point of the game is to fool the
  22. linker--the code inside if (gDeadStripSuppression) {} should NEVER be executed
  23. because gDeadStripSuppression is ALWAYS false.  The linker doesn't know this,
  24. so it doesn't strip those classes.  So you could do a aFoo.Free(), but it
  25. should be just extra typing practice because the new TFoo shouldn't be executed
  26. either.
  27.  
  28.   Mark
  29.  
  30.